﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AssetManagementSystem.Model.IDao {
    public interface IAssetDAO {
        /// <summary>
        /// Create a new asset in the database, from an 'Asset' business object.
        /// </summary>
        /// <param name="asset">The asset object to be stored in the database</param>
        void CreateAsset(Asset asset);
        /// <summary>
        /// Retrieve a single asset from the database, using its ID as the PKey.
        /// </summary>
        /// <param name="id">The Id of the asset to be retrieved</param>
        /// <returns>The 'Asset' business object for the requested asset.</returns>
        Asset GetAsset(string id);
        /// <summary>
        /// Returns a collection of all assets found within the database.
        /// </summary>
        /// <returns>A collection of all assets found within the database.</returns>
        ICollection<Asset> GetAllAssets();
        /// <summary>
        /// Update the details of an asset already stored within the database.
        /// </summary>
        /// <param name="asset">The new details of the asset to update. ID must remain the same as it is the PKey.</param>
        void UpdateAsset(Asset asset);
        /// <summary>
        /// Delete data for a single asset from the database.
        /// </summary>
        /// <param name="id">The asset id of the asset to be deleted.</param>
        void DeleteAsset(Asset asset);
        /// <summary>
        /// Deletes a property of the specified asset
        /// </summary>
        /// <param name="assetId">The asset whos property is being deleted</param>
        /// <param name="name">The name of the property to delete</param>
        void DeleteAssetProperty(string assetId, string name);
    }
}
